Locust FastHttpUser This function generates a custom Locust user class to simulate random user activities on a website, such as logging in, logging out, and viewing a profile. The type of user activity is determined by the parameter `activity_type`. Custom Locust user class 2024-12-16 12:10:00 3 views
Locust This code defines a user class (either HttpUser or FastHttpUser) randomly chosen from the Locust library. It includes three tasks: loading a page, posting data, and getting user information. There is a random wait time between tasks. Locust user class 2024-12-16 12:06:56 4 views
The code This code defines a user behavior based on the Locust library, simulating random actions of a user on a website, including accessing random resources, submitting forms, browsing products, searching for products, and logging in and out. The type of code 2024-12-16 12:06:40 16 views
Locust FastHttpUser This function randomly returns one of two Locust user classes. The first one is a random task user based on FastHttpUser, and the second one is a random shape user based on HttpUser and LoadTestShape. Locust User Class 2024-12-16 12:03:10 3 views
Locust FastHttpUser This code defines a simulation function based on Locust, which simulates a FastHttpUser that randomly selects an HTTP GET request to the `/random-item` path. The function also includes command-line arguments to start the simulation. The type of code 2024-12-16 11:56:39 5 views
Locust FastHttpUser This code defines a user behavior based on the Locust framework, which includes three tasks: fetching a random image, subscribing to a channel, and sending a private message. It also listens to the user creation event to adjust the hatch rate. The type of code 2024-12-16 11:54:17 5 views
Locust FastHttpUser This code defines a function `generate_random_user` that returns a custom Locust user class `RandomUser`. `RandomUser` inherits from `FastHttpUser` and is used to simulate HTTP requests. The function accepts three parameters, which are used to send HTTP GET requests at the user's start, stop, and during task execution. The function uses random wait times to simulate the behavior of real users. The type of code 2024-12-16 11:48:10 3 views
Locust FastHttpUser This code defines a function named random_user_activity that uses the Locust library to simulate user behavior. The user will visit the home page, click on a link, and submit a form. The type of code 2024-12-16 11:47:19 4 views
Locust FastHttpUser This function defines two tasks: one to get random user data and another to send random user data to the server. Locust Task Function 2024-12-16 11:47:17 4 views
Locust FastHttpUser This function simulates random user behaviors on an e-commerce website, including browsing products, adding to the cart, and checkout. It uses features from the Locust library such as task decorators, random wait times, user classes, HTTP clients, and JSON processing. Function 2024-12-16 11:43:57 5 views